<?php

namespace WinZ\DataMinerBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * Node
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="WinZ\DataMinerBundle\Entity\Entity\NodeRepository")
 */
class Node
{
    /**
     * @var integer
     *
     * @ORM\Column(type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @ORM\Column(type="datetime", nullable=false)
     */
    private $dt;
    
    /**
     * @var integer
     *
     * @ORM\Column(name="qty", type="integer")
     */
    private $qty = 0;

    /**
    * @ORM\ManyToOne(targetEntity="Session", inversedBy="nodes")
    * @ORM\JoinColumn(nullable=false, onDelete="CASCADE")
    */
    private $session;
    
    
    public function __construct() {
        $this->setDt(new \DateTime());
    }
    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set dt
     *
     * @param \DateTime $dt
     * @return Node
     */
    public function setDt(\DateTime $dt)
    {
        $this->dt = $dt;
        return $this;
    }

    
    /**
     * Get dt
     *
     * @return \DateTime
     */    
    public function getDt()
    {
        return $this->dt;
    }
    
    
    
    
    /**
     * Set qty
     *
     * @param integer $qty
     * @return Node
     */
    public function setQty($qty)
    {
        $this->qty = $qty;
    
        return $this;
    }

    /**
     * Get qty
     *
     * @return integer 
     */
    public function getQty()
    {
        return $this->qty;
    }

    /**
     * Set session
     *
     * @param \WinZ\DataMinerBundle\Entity\Session $session
     * @return Node
     */
    public function setSession(\WinZ\DataMinerBundle\Entity\Session $session)
    {
        $this->session = $session;
    
        return $this;
    }

    /**
     * Get session
     *
     * @return \WinZ\DataMinerBundle\Entity\Session 
     */
    public function getSession()
    {
        return $this->session;
    }
}